#!/bin/sh
ss="/usr/share/nginx/html/www/vote/signal.txt"
while true; do
 if [ -f "$ss" ];then
         cc=$(cat $ss)
        if [[ $cc -eq 1 ]];then
                /usr/local/openresty/nginx/sbin/nginx -s reload
                echo 0 > $ss
        fi

        if [[ $cc -eq -1 ]];then
                /usr/local/openresty/nginx/sbin/nginx -s stop
                echo 0 > $ss
        fi
 fi
 sleep 10;
done
